'''
Created on 2010-10-20

@author: Administrator
'''

def dec(func):
    def _dec(*args, **kwargs):
        print 'begin'
        return_data = func(*args, **kwargs)
        print 'end'
        return return_data
    return _dec

@dec
def hello(request=None):
    print request
@dec
def world(request=None):
    print 'that is ok'
    
if __name__ == '__main__':
    print world
    world('OK')
    